package org.example.commerce.imp.service;

import com.github.pagehelper.PageInfo;
import org.example.commerce.api.beans.ModifyUserParam;
import org.example.commerce.api.beans.NewUserParam;
import org.example.commerce.dao.entity.User;
import org.example.common.response.R;

import javax.servlet.http.HttpServletRequest;

public interface UserService {
    R<User> userLogin(HttpServletRequest request, String username, String password);

    R<User> userSave(HttpServletRequest request, NewUserParam user);

    R<PageInfo<User>> users(Integer page, Integer pageSize);

    User selectUserByName(String name);

    R<String> deleteUserById(Long id);

    R<User> modifyUser(ModifyUserParam user);

    User selectById(Integer id);

    R<User> setUserStatus(Integer id);
}
